home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / nfsmount / RCS / nfs_prot_clnt.c,v < prev    next >
Text File  |  1989-10-10  |  6KB  |  341 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     89.10.10.13.17.32;  author douglis;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     88.11.02.12.44.52;  author brent;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @This file derived from nfs_prot.x
  22. @
  23.  
  24.  
  25. 1.2
  26. log
  27. @Changed void * to VoidPtr to remove lint
  28. @
  29. text
  30. @#include <rpc/rpc.h>
  31. #include <sys/time.h>
  32. #include "nfs_prot.h"
  33.  
  34. static struct timeval TIMEOUT = { 25, 0 };
  35.  
  36. VoidPtr 
  37. nfsproc_null_2(argp, clnt)
  38.     VoidPtr argp;
  39.     CLIENT *clnt;
  40. {
  41.     static char res;
  42.  
  43.     bzero(&res, sizeof(res));
  44.     if (clnt_call(clnt, NFSPROC_NULL, xdr_void, argp, xdr_void, &res, TIMEOUT) != RPC_SUCCESS) {
  45.         return (NULL);
  46.     }
  47.     return ((VoidPtr)&res);
  48. }
  49.  
  50.  
  51. attrstat *
  52. nfsproc_getattr_2(argp, clnt)
  53.     nfs_fh *argp;
  54.     CLIENT *clnt;
  55. {
  56.     static attrstat res;
  57.  
  58.     bzero(&res, sizeof(res));
  59.     if (clnt_call(clnt, NFSPROC_GETATTR, xdr_nfs_fh, argp, xdr_attrstat, &res, TIMEOUT) != RPC_SUCCESS) {
  60.         return (NULL);
  61.     }
  62.     return (&res);
  63. }
  64.  
  65.  
  66. attrstat *
  67. nfsproc_setattr_2(argp, clnt)
  68.     sattrargs *argp;
  69.     CLIENT *clnt;
  70. {
  71.     static attrstat res;
  72.  
  73.     bzero(&res, sizeof(res));
  74.     if (clnt_call(clnt, NFSPROC_SETATTR, xdr_sattrargs, argp, xdr_attrstat, &res, TIMEOUT) != RPC_SUCCESS) {
  75.         return (NULL);
  76.     }
  77.     return (&res);
  78. }
  79.  
  80.  
  81. VoidPtr 
  82. nfsproc_root_2(argp, clnt)
  83.     VoidPtr argp;
  84.     CLIENT *clnt;
  85. {
  86.     static char res;
  87.  
  88.     bzero(&res, sizeof(res));
  89.     if (clnt_call(clnt, NFSPROC_ROOT, xdr_void, argp, xdr_void, &res, TIMEOUT) != RPC_SUCCESS) {
  90.         return (NULL);
  91.     }
  92.     return ((VoidPtr)&res);
  93. }
  94.  
  95.  
  96. diropres *
  97. nfsproc_lookup_2(argp, clnt)
  98.     diropargs *argp;
  99.     CLIENT *clnt;
  100. {
  101.     static diropres res;
  102.  
  103.     bzero(&res, sizeof(res));
  104.     if (clnt_call(clnt, NFSPROC_LOOKUP, xdr_diropargs, argp, xdr_diropres, &res, TIMEOUT) != RPC_SUCCESS) {
  105.         return (NULL);
  106.     }
  107.     return (&res);
  108. }
  109.  
  110.  
  111. readlinkres *
  112. nfsproc_readlink_2(argp, clnt)
  113.     nfs_fh *argp;
  114.     CLIENT *clnt;
  115. {
  116.     static readlinkres res;
  117.  
  118.     bzero(&res, sizeof(res));
  119.     if (clnt_call(clnt, NFSPROC_READLINK, xdr_nfs_fh, argp, xdr_readlinkres, &res, TIMEOUT) != RPC_SUCCESS) {
  120.         return (NULL);
  121.     }
  122.     return (&res);
  123. }
  124.  
  125.  
  126. readres *
  127. nfsproc_read_2(argp, clnt)
  128.     readargs *argp;
  129.     CLIENT *clnt;
  130. {
  131.     static readres res;
  132.  
  133.     bzero(&res, sizeof(res));
  134.     if (clnt_call(clnt, NFSPROC_READ, xdr_readargs, argp, xdr_readres, &res, TIMEOUT) != RPC_SUCCESS) {
  135.         return (NULL);
  136.     }
  137.     return (&res);
  138. }
  139.  
  140.  
  141. VoidPtr 
  142. nfsproc_writecache_2(argp, clnt)
  143.     VoidPtr argp;
  144.     CLIENT *clnt;
  145. {
  146.     static char res;
  147.  
  148.     bzero(&res, sizeof(res));
  149.     if (clnt_call(clnt, NFSPROC_WRITECACHE, xdr_void, argp, xdr_void, &res, TIMEOUT) != RPC_SUCCESS) {
  150.         return (NULL);
  151.     }
  152.     return ((VoidPtr)&res);
  153. }
  154.  
  155.  
  156. attrstat *
  157. nfsproc_write_2(argp, clnt)
  158.     writeargs *argp;
  159.     CLIENT *clnt;
  160. {
  161.     static attrstat res;
  162.  
  163.     bzero(&res, sizeof(res));
  164.     if (clnt_call(clnt, NFSPROC_WRITE, xdr_writeargs, argp, xdr_attrstat, &res, TIMEOUT) != RPC_SUCCESS) {
  165.         return (NULL);
  166.     }
  167.     return (&res);
  168. }
  169.  
  170.  
  171. diropres *
  172. nfsproc_create_2(argp, clnt)
  173.     createargs *argp;
  174.     CLIENT *clnt;
  175. {
  176.     static diropres res;
  177.  
  178.     bzero(&res, sizeof(res));
  179.     if (clnt_call(clnt, NFSPROC_CREATE, xdr_createargs, argp, xdr_diropres, &res, TIMEOUT) != RPC_SUCCESS) {
  180.         return (NULL);
  181.     }
  182.     return (&res);
  183. }
  184.  
  185.  
  186. nfsstat *
  187. nfsproc_remove_2(argp, clnt)
  188.     diropargs *argp;
  189.     CLIENT *clnt;
  190. {
  191.     static nfsstat res;
  192.  
  193.     bzero(&res, sizeof(res));
  194.     if (clnt_call(clnt, NFSPROC_REMOVE, xdr_diropargs, argp, xdr_nfsstat, &res, TIMEOUT) != RPC_SUCCESS) {
  195.         return (NULL);
  196.     }
  197.     return (&res);
  198. }
  199.  
  200.  
  201. nfsstat *
  202. nfsproc_rename_2(argp, clnt)
  203.     renameargs *argp;
  204.     CLIENT *clnt;
  205. {
  206.     static nfsstat res;
  207.  
  208.     bzero(&res, sizeof(res));
  209.     if (clnt_call(clnt, NFSPROC_RENAME, xdr_renameargs, argp, xdr_nfsstat, &res, TIMEOUT) != RPC_SUCCESS) {
  210.         return (NULL);
  211.     }
  212.     return (&res);
  213. }
  214.  
  215.  
  216. nfsstat *
  217. nfsproc_link_2(argp, clnt)
  218.     linkargs *argp;
  219.     CLIENT *clnt;
  220. {
  221.     static nfsstat res;
  222.  
  223.     bzero(&res, sizeof(res));
  224.     if (clnt_call(clnt, NFSPROC_LINK, xdr_linkargs, argp, xdr_nfsstat, &res, TIMEOUT) != RPC_SUCCESS) {
  225.         return (NULL);
  226.     }
  227.     return (&res);
  228. }
  229.  
  230.  
  231. nfsstat *
  232. nfsproc_symlink_2(argp, clnt)
  233.     symlinkargs *argp;
  234.     CLIENT *clnt;
  235. {
  236.     static nfsstat res;
  237.  
  238.     bzero(&res, sizeof(res));
  239.     if (clnt_call(clnt, NFSPROC_SYMLINK, xdr_symlinkargs, argp, xdr_nfsstat, &res, TIMEOUT) != RPC_SUCCESS) {
  240.         return (NULL);
  241.     }
  242.     return (&res);
  243. }
  244.  
  245.  
  246. diropres *
  247. nfsproc_mkdir_2(argp, clnt)
  248.     createargs *argp;
  249.     CLIENT *clnt;
  250. {
  251.     static diropres res;
  252.  
  253.     bzero(&res, sizeof(res));
  254.     if (clnt_call(clnt, NFSPROC_MKDIR, xdr_createargs, argp, xdr_diropres, &res, TIMEOUT) != RPC_SUCCESS) {
  255.         return (NULL);
  256.     }
  257.     return (&res);
  258. }
  259.  
  260.  
  261. nfsstat *
  262. nfsproc_rmdir_2(argp, clnt)
  263.     diropargs *argp;
  264.     CLIENT *clnt;
  265. {
  266.     static nfsstat res;
  267.  
  268.     bzero(&res, sizeof(res));
  269.     if (clnt_call(clnt, NFSPROC_RMDIR, xdr_diropargs, argp, xdr_nfsstat, &res, TIMEOUT) != RPC_SUCCESS) {
  270.         return (NULL);
  271.     }
  272.     return (&res);
  273. }
  274.  
  275.  
  276. readdirres *
  277. nfsproc_readdir_2(argp, clnt)
  278.     readdirargs *argp;
  279.     CLIENT *clnt;
  280. {
  281.     static readdirres res;
  282.  
  283.     bzero(&res, sizeof(res));
  284.     if (clnt_call(clnt, NFSPROC_READDIR, xdr_readdirargs, argp, xdr_readdirres, &res, TIMEOUT) != RPC_SUCCESS) {
  285.         return (NULL);
  286.     }
  287.     return (&res);
  288. }
  289.  
  290.  
  291. statfsres *
  292. nfsproc_statfs_2(argp, clnt)
  293.     nfs_fh *argp;
  294.     CLIENT *clnt;
  295. {
  296.     static statfsres res;
  297.  
  298.     bzero(&res, sizeof(res));
  299.     if (clnt_call(clnt, NFSPROC_STATFS, xdr_nfs_fh, argp, xdr_statfsres, &res, TIMEOUT) != RPC_SUCCESS) {
  300.         return (NULL);
  301.     }
  302.     return (&res);
  303. }
  304.  
  305. @
  306.  
  307.  
  308. 1.1
  309. log
  310. @Initial revision
  311. @
  312. text
  313. @d7 1
  314. a7 1
  315. void *
  316. d9 1
  317. a9 1
  318.     void *argp;
  319. d18 1
  320. a18 1
  321.     return ((void *)&res);
  322. d52 1
  323. a52 1
  324. void *
  325. d54 1
  326. a54 1
  327.     void *argp;
  328. d63 1
  329. a63 1
  330.     return ((void *)&res);
  331. d112 1
  332. a112 1
  333. void *
  334. d114 1
  335. a114 1
  336.     void *argp;
  337. d123 1
  338. a123 1
  339.     return ((void *)&res);
  340. @
  341.